wayland: Retrieve the data device manager object
authorRob Bradford <rob@linux.intel.com>
Mon, 12 Dec 2011 13:56:25 +0000 (13:56 +0000)
committerRob Bradford <rob@linux.intel.com>
Wed, 14 Dec 2011 14:43:35 +0000 (14:43 +0000)
The data device manager is a global object that provides the support
infrastructure around data devices. These data device objects are the basis
for handling drag and drop as well as selections in Wayland.

gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkdisplay-wayland.h

index bb1166ff0bfa5b17a21509207bc464973bac605f..47b8cac879c90211bf6282c0054fc8d065a3c718 100644 (file)
@@ -140,6 +140,10 @@ gdk_display_handle_global(struct wl_display *display, uint32_t id,
     input = wl_display_bind(display, id, &wl_input_device_interface);
     _gdk_wayland_device_manager_add_device (gdk_display->device_manager,
                                            input);
+  } else if (strcmp(interface, "wl_data_device_manager") == 0) {
+      display_wayland->data_device_manager =
+        wl_display_bind(display, id,
+                        &wl_data_device_manager_interface);
   }
 }
 
index 88756afbb2f20727a02266f485b2ff201499aed0..db98824dcc24df765a7c788f897cbc866ec91efa 100644 (file)
@@ -76,6 +76,7 @@ struct _GdkDisplayWayland
   struct wl_shell *shell;
   struct wl_output *output;
   struct wl_input_device *input_device;
+  struct wl_data_device_manager *data_device_manager;
   GSource *event_source;
   EGLDisplay egl_display;
   EGLContext egl_context;